package cn.eleven.service.impl;

import cn.eleven.entity.Staff;
import cn.eleven.mapper.StaffMapper;
import cn.eleven.service.StaffService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StaffServiceImpl implements StaffService {

    @Autowired
    private StaffMapper staffMapper;

    @Override
    public List<Staff> getAllStaff() {
        return staffMapper.selectList(null);
    }

    @Override
    public IPage<Staff> getStaffByPage(Page<Staff> page) {
        return staffMapper.selectPage(page, null);
    }
}